package com.sunmouse.toolkit.util;

import android.content.Context;

import com.google.zxing.WriterException;

import java.io.IOException;

/**
 * Created by leiyun on 2018/5/23.
 */
public class QRCodeUtil {
    private static com.google.zxing.encode.util.QRCodeUtil mUtil;

    /**
     * get instance
     */
    private static com.google.zxing.encode.util.QRCodeUtil getInstance() {
        if (mUtil == null) mUtil = new com.google.zxing.encode.util.QRCodeUtil();
        return mUtil;
    }
    /**
     * create image
     */
    public static void createImage(String content, String logoUrl, String desPath, Context context){
        try {
            mUtil.generateImage(content,logoUrl,desPath,context);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
